package com.atguigu.service;

import com.alipay.api.AlipayApiException;
import com.atguigu.entity.PaymentInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 * 支付信息表 服务类
 * </p>
 *
 * @author GuoJH
 * @since 2021-09-10
 */
public interface PaymentInfoService extends IService<PaymentInfo> {
    //生成支付宝付款的二维码
    String createQrCode(Long orderId) throws Exception;
    //从paramMap中获取订单的交易编号(商户订单号) 通过编号获取订单的信息
    PaymentInfo getPaymentInfoByOutTradeNo(String outTradeNo);
    //更新支付的状态
    void updatePaymentInfo(PaymentInfo paymentInfo, Map<String, String> paramMap);
    //支付宝的退款接口
    boolean refund(Long orderId) throws Exception;
    //关闭支付宝的交易接口
    boolean closeAlipayTrade(Long orderId) throws Exception;
    //查询支付宝的内部订单信息
    boolean queryAlipayTrade(Long orderId) throws Exception;
    //关闭支付订单的状态
    void closePaymentInfo(Long orderId);
}
